package com.shujia.wyh.day03;

/*
    赋值运算符：
        =，+=，-=，*=，/=，%=

    面试题：
        a = a+1与a+=1;
 */
public class OptFuZhiDemo1 {
    public static void main(String[] args) {
        int a1 = 3;
        int b1 = 4;
        int c1 = 5;

        int a = b1 = c1;
        System.out.println(a);
        System.out.println(b1);
        System.out.println(c1);

        //+=
        int a2 = 1;
        a2 += 3;
        System.out.println(a2);

        //-=
        a2 -= 3;
        System.out.println(a2);

        //*=
        a2 *= 6;
        System.out.println(a2);

        // /=
        a2 /= 2;
        System.out.println(a2);

        //%=
        a2 %= 4;
        System.out.println(a2);


    }
}
